package Professor;

import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class SubjectCapsulation extends JPanel{
	
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	
	public SubjectCapsulation() {
	
	GridBagLayout gbl_contentPane = new GridBagLayout();
	gbl_contentPane.columnWidths = new int[]{0, 0, 120, 0, 0, 0, 0, 0, 0, 0};
	gbl_contentPane.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
	gbl_contentPane.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
	gbl_contentPane.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
	setLayout(gbl_contentPane);
	
	
	// Jtable 창을 생성하여 현재 등록 과목을 조회 할 수 있는 창을 만들기
	
	// SUbjectJTable<< 과 연동
	
	// 추가 등록창은 오른쪽으로 몰아넣읍시다. ↓
	
	
	JLabel lblNewLabel = new JLabel("과목 등록/삭제");
	GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
	gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
	gbc_lblNewLabel.gridx = 2;
	gbc_lblNewLabel.gridy = 0;
	add(lblNewLabel, gbc_lblNewLabel);
	
	JLabel lblNewLabel_1 = new JLabel("과목 번호 :");
	lblNewLabel_1.setAlignmentX(Component.RIGHT_ALIGNMENT);
	GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
	gbc_lblNewLabel_1.anchor = GridBagConstraints.EAST;
	gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);
	gbc_lblNewLabel_1.gridx = 1;
	gbc_lblNewLabel_1.gridy = 1;
	add(lblNewLabel_1, gbc_lblNewLabel_1);
	
	textField = new JTextField();
	GridBagConstraints gbc_textField = new GridBagConstraints();
	gbc_textField.insets = new Insets(0, 0, 5, 5);
	gbc_textField.fill = GridBagConstraints.HORIZONTAL;
	gbc_textField.gridx = 2;
	gbc_textField.gridy = 1;
	add(textField, gbc_textField);
	textField.setColumns(10);
	
	JLabel lblNewLabel_2 = new JLabel("과목명 :");
	lblNewLabel_2.setAlignmentX(Component.RIGHT_ALIGNMENT);
	GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();
	gbc_lblNewLabel_2.anchor = GridBagConstraints.EAST;
	gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5);
	gbc_lblNewLabel_2.gridx = 1;
	gbc_lblNewLabel_2.gridy = 2;
	add(lblNewLabel_2, gbc_lblNewLabel_2);
	
	textField_1 = new JTextField();
	GridBagConstraints gbc_textField_1 = new GridBagConstraints();
	gbc_textField_1.insets = new Insets(0, 0, 5, 5);
	gbc_textField_1.fill = GridBagConstraints.HORIZONTAL;
	gbc_textField_1.gridx = 2;
	gbc_textField_1.gridy = 2;
	add(textField_1, gbc_textField_1);
	textField_1.setColumns(10);
	
	JLabel lblNewLabel_3 = new JLabel("과목 유형 번호 :");
	lblNewLabel_3.setAlignmentX(Component.RIGHT_ALIGNMENT);
	GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints();
	gbc_lblNewLabel_3.anchor = GridBagConstraints.EAST;
	gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5);
	gbc_lblNewLabel_3.gridx = 1;
	gbc_lblNewLabel_3.gridy = 3;
	add(lblNewLabel_3, gbc_lblNewLabel_3);
	
	textField_2 = new JTextField();
	GridBagConstraints gbc_textField_2 = new GridBagConstraints();
	gbc_textField_2.insets = new Insets(0, 0, 5, 5);
	gbc_textField_2.fill = GridBagConstraints.HORIZONTAL;
	gbc_textField_2.gridx = 2;
	gbc_textField_2.gridy = 3;
	add(textField_2, gbc_textField_2);
	textField_2.setColumns(10);
	
	JLabel lblNewLabel_4 = new JLabel("과목 개요 :");
	lblNewLabel_4.setAlignmentX(Component.RIGHT_ALIGNMENT);
	GridBagConstraints gbc_lblNewLabel_4 = new GridBagConstraints();
	gbc_lblNewLabel_4.anchor = GridBagConstraints.EAST;
	gbc_lblNewLabel_4.insets = new Insets(0, 0, 5, 5);
	gbc_lblNewLabel_4.gridx = 1;
	gbc_lblNewLabel_4.gridy = 4;
	add(lblNewLabel_4, gbc_lblNewLabel_4);
	
	textField_3 = new JTextField();
	GridBagConstraints gbc_textField_3 = new GridBagConstraints();
	gbc_textField_3.insets = new Insets(0, 0, 5, 5);
	gbc_textField_3.fill = GridBagConstraints.HORIZONTAL;
	gbc_textField_3.gridx = 2;
	gbc_textField_3.gridy = 4;
	add(textField_3, gbc_textField_3);
	textField_3.setColumns(10);
	
	JLabel lblNewLabel_5 = new JLabel("배정 학점 :");
	lblNewLabel_5.setAlignmentX(Component.RIGHT_ALIGNMENT);
	GridBagConstraints gbc_lblNewLabel_5 = new GridBagConstraints();
	gbc_lblNewLabel_5.anchor = GridBagConstraints.EAST;
	gbc_lblNewLabel_5.insets = new Insets(0, 0, 5, 5);
	gbc_lblNewLabel_5.gridx = 1;
	gbc_lblNewLabel_5.gridy = 5;
	add(lblNewLabel_5, gbc_lblNewLabel_5);
	
	JButton btnNewButton_2 = new JButton("등록");
	btnNewButton_2.addMouseListener(new MouseAdapter() {
		@Override
		public void mousePressed(MouseEvent e) {
	
	        repaint();
		}
	});
	
	textField_4 = new JTextField();
	GridBagConstraints gbc_textField_4 = new GridBagConstraints();
	gbc_textField_4.insets = new Insets(0, 0, 5, 5);
	gbc_textField_4.fill = GridBagConstraints.HORIZONTAL;
	gbc_textField_4.gridx = 2;
	gbc_textField_4.gridy = 5;
	add(textField_4, gbc_textField_4);
	textField_4.setColumns(10);
	
	GridBagConstraints gbc_btnNewButton_2 = new GridBagConstraints();
	gbc_btnNewButton_2.insets = new Insets(0, 0, 5, 5);
	gbc_btnNewButton_2.gridx = 1;
	gbc_btnNewButton_2.gridy = 6;
	add(btnNewButton_2, gbc_btnNewButton_2);
	
	JButton btnNewButton_1 = new JButton("삭제");
	btnNewButton_1.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent arg0) {
		}
	});
	GridBagConstraints gbc_btnNewButton_1 = new GridBagConstraints();
	gbc_btnNewButton_1.insets = new Insets(0, 0, 5, 5);
	gbc_btnNewButton_1.gridx = 2;
	gbc_btnNewButton_1.gridy = 6;
	add(btnNewButton_1, gbc_btnNewButton_1);
	
	JButton button = new JButton("조회");
	GridBagConstraints gbc_button = new GridBagConstraints();
	gbc_button.insets = new Insets(0, 0, 5, 5);
	gbc_button.gridx = 3;
	gbc_button.gridy = 6;
	add(button, gbc_button);
}
}


	

